package net.protocols;

import net.Client;
import net.dto.ClientObject;
import net.dto.ServerObject;
import gui.client.ClientControlFrame;
import gui.client.ClientRenderer;

public class ClientProtocol {

	private static final int INITIALIZE = 0;
	private static final int WAITING = 1;
	private static final int PLAYING = 2;
	private int CURRENT_STATE = 0;
	
	private ClientRenderer gr;
	private ClientControlFrame cf;
	private Client client;
	
	public ClientProtocol(Client client){
		this.client = client;
	}
	
	public ClientObject processInput(ServerObject so){
		String input = so.getMessage();
		if(CURRENT_STATE == INITIALIZE){
			client.id = Integer.parseInt(input);
			CURRENT_STATE = WAITING;
			return new ClientObject("ID Received: "+client.id, "");
		}else if(CURRENT_STATE == WAITING){
			
		}
			
		return null;
	}
	
	
	
}
